package com.mooer.bean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import android.graphics.Bitmap;

/**
 * 商家信息Bean
 * 
 * @author Minglong.Yu
 * @version 1.0
 * @created May 3, 2011 9:36:10 AM
 */
public class Shop implements Serializable {
	private int id;
	/*
	 * 商家名称
	 */
	private String name;
	/*
	 * 目录id
	 */
	private int categoryId;
	/*
	 * 目录名称
	 */
	private String categoryName;
	/*
	 * 商家封面图片URL
	 */
	private String logo;
	/*
	 * 商家联系电话
	 */
	private String phone;
	/*
	 * 商家种类
	 */
	private String type;
	/*
	 * 平均消费
	 */
	private double avgConsumption;
	/*
	 * 是否有优惠券
	 */
	private boolean isHasCoupon;
	/*
	 * 评分
	 */
	private double rating;
	/*
	 * 商家地址
	 */
	private ShopAddress address;
	/*
	 * 和当前用户的距离 单位m
	 */
	private double distance;
	/*
	 * 提供的服务
	 */
	private String services;

	/**
	 * 促销ID
	 */
	private int promotionId;

	/**
	 * 促销标题
	 */
	private String promotionTitle;

	/**
	 * 促销内容
	 */
	private String promotionContent;

	/**
	 * 促销帮助
	 */
	private String promotionHelp;

	/**
	 * 优惠券截至时间
	 */
	private String couponDateline;
	private List<String> photos = new ArrayList<String>();
	/*
	 * 商家介绍
	 */
	private String intro;

	private Bitmap icon;

	public Bitmap getIcon() {
		return icon;
	}

	public void setIcon(Bitmap icon) {
		this.icon = icon;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(int categoryId) {
		this.categoryId = categoryId;
	}

	public String getCategoryName() {
		return categoryName;
	}

	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}

	public String getLogo() {
		return logo;
	}

	public void setLogo(String logo) {
		this.logo = logo;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public double getAvgConsumption() {
		return avgConsumption;
	}

	public void setAvgConsumption(double avgConsumption) {
		this.avgConsumption = avgConsumption;
	}

	public double getRating() {
		return rating;
	}

	public void setRating(double rating) {
		this.rating = rating;
	}

	public double getDistance() {
		return distance;
	}

	public void setDistance(double distance) {
		this.distance = distance;
	}

	public String getServices() {
		return services;
	}

	public void setServices(String services) {
		this.services = services;
	}

	/**
	 * @return the promotionId
	 */
	public int getPromotionId() {
		return promotionId;
	}

	/**
	 * @param promotionId
	 *            the promotionId to set
	 */
	public void setPromotionId(int promotionId) {
		this.promotionId = promotionId;
	}

	/**
	 * @return the promotionTitle
	 */
	public String getPromotionTitle() {
		return promotionTitle;
	}

	/**
	 * @param promotionTitle
	 *            the promotionTitle to set
	 */
	public void setPromotionTitle(String promotionTitle) {
		this.promotionTitle = promotionTitle;
	}

	/**
	 * @return the promotionContent
	 */
	public String getPromotionContent() {
		return promotionContent;
	}

	/**
	 * @param promotionContent
	 *            the promotionContent to set
	 */
	public void setPromotionContent(String promotionContent) {
		this.promotionContent = promotionContent;
	}

	/**
	 * @return the promotionHelp
	 */
	public String getPromotionHelp() {
		return promotionHelp;
	}

	/**
	 * @param promotionHelp
	 *            the promotionHelp to set
	 */
	public void setPromotionHelp(String promotionHelp) {
		this.promotionHelp = promotionHelp;
	}

	public String getIntro() {
		return intro;
	}

	public void setIntro(String intro) {
		this.intro = intro;
	}

	public ShopAddress getAddress() {
		return address;
	}

	public void setAddress(ShopAddress address) {
		this.address = address;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public boolean isHasCoupon() {
		return isHasCoupon;
	}

	public void setHasCoupon(boolean isHasCoupon) {
		this.isHasCoupon = isHasCoupon;
	}

	/**
	 * @return the couponDateline
	 */
	public String getCouponDateline() {
		return couponDateline;
	}

	/**
	 * @param couponDateline
	 *            the couponDateline to set
	 */
	public void setCouponDateline(String couponDateline) {
		this.couponDateline = couponDateline;
	}

	public Shop copy() {
		Shop s = new Shop();
		s.address = this.getAddress();
		s.avgConsumption = this.getAvgConsumption();
		s.categoryId = this.getCategoryId();
		s.categoryName = this.getCategoryName();
		s.couponDateline = this.getCouponDateline();
		s.distance = this.getDistance();
		s.id = this.getId();
		s.intro = this.getIntro();
		s.isHasCoupon = this.isHasCoupon;
		s.logo = this.logo;
		s.name = this.name;
		s.phone = this.phone;
		s.promotionContent = this.promotionContent;
		s.promotionHelp = this.promotionHelp;
		s.promotionId = this.promotionId;
		s.promotionTitle = this.promotionTitle;
		s.rating = this.rating;
		s.services = this.services;
		s.type = this.type;
		s.address = this.address;
		return s;
	}

	/**
	 * @return the photos
	 */
	public List<String> getPhotos() {
		return photos;
	}

	/**
	 * @param photos
	 *            the photos to set
	 */
	public void setPhotos(List<String> photos) {
		this.photos = photos;
	}

	public void addPhoto(String imgURL) {
		this.photos.add(imgURL);
	}
}
